home *** CD-ROM | disk | FTP | other *** search
- class §#10§ extends §#21§
- {
- static var §#3§ = false;
- static var §#238§ = 0;
- static var §#164§ = 1;
- static var §#172§ = 2;
- static var §#61§ = 3;
- static var §#90§ = 4;
- static var §#197§ = ["#386","#441","#452","#465","Score"];
- var §#230§ = 0.046;
- var §#416§ = 0.046;
- var FPS = 18;
- var §#186§ = 0;
- var §#7§ = 0;
- var §#181§ = 100;
- var §#182§ = 95;
- var x = 0;
- var y = 0;
- var §#293§ = 0;
- var §#65§ = 0;
- var §#84§ = 0;
- var §#213§ = 0;
- var §#104§ = 0;
- var §#105§ = 0;
- var §#214§ = 0;
- var x2 = 0;
- var §#156§ = 0;
- var §#292§ = 0;
- var x3 = 0;
- var §#212§ = 0;
- var §#395§ = 0;
- var §#209§ = 0;
- var §#210§ = 0;
- var §#211§ = 0;
- var §#153§ = 0;
- var §#154§ = 0;
- var §#155§ = 0;
- var §#125§ = 0;
- var §#126§ = 0;
- var §#127§ = 0;
- var §#16§ = 0;
- var r = 0;
- function §#10§()
- {
- super();
- }
- function §#2§()
- {
- return "Ball (" + this + ", " + eval("#10")["#197"][this["#7"]] + "): ";
- }
- function toString()
- {
- return "[Ball " + this + " state: " + eval("#10")["#197"][this["#7"]] + " frame: " + this._currentframe + "/" + this._totalframes + " location: " + this._x + "," + this._y + "]";
- }
- function §#8§(§#97§)
- {
- if(eval("#10")["#3"])
- {
- eval("#0").log(this["#2"]() + "changing to state " + eval("#10")["#197"][§#97§]);
- }
- if(this["#7"] == §#97§)
- {
- return undefined;
- }
- if(§#97§ != eval("#10")["#61"])
- {
- this._alpha = 100;
- }
- switch(§#97§)
- {
- case eval("#10")["#172"]:
- this["#16"] = 0;
- this["#181"] = _root["#4"]["#9"]._xscale;
- this["#99"]();
- this["#205"]();
- break;
- case eval("#10")["#61"]:
- this["#268"]();
- _root["#4"]["#394"]();
- this["#16"] = 0;
- this["#358"]();
- break;
- case eval("#10")["#90"]:
- this["#268"]();
- _root["#4"].score();
- this["#16"] = 0;
- this["#363"]();
- }
- this["#7"] = §#97§;
- }
- function update()
- {
- switch(this["#7"])
- {
- case eval("#10")["#172"]:
- this["#99"]();
- if(this["#103#10"]())
- {
- this["#8"](this["#186"]);
- }
- break;
- case eval("#10")["#61"]:
- case eval("#10")["#90"]:
- if(this["#103#10"]())
- {
- if(eval("#10")["#3"])
- {
- eval("#0").log(this["#2"]() + "done moving ball for miss or score");
- }
- this["#8"](eval("#10")["#238"]);
- _root["#4"]["#318"]();
- }
- else
- {
- this._alpha -= 8;
- }
- }
- }
- function §#99§()
- {
- var _loc2_ = this["#181"] - (this["#181"] - this["#182"]) * this["#16"];
- this._xscale = _loc2_;
- this._yscale = _loc2_;
- }
- function §#268§()
- {
- this._xscale = this["#182"];
- this._yscale = this["#182"];
- }
- function §#205§()
- {
- if(eval("#10")["#3"])
- {
- eval("#0").log(this["#2"]() + "shooting ball");
- }
- this.swapDepths(_root["#35"]);
- var _loc3_ = 0;
- var _loc7_ = 0;
- var _loc4_ = _root["#4"].getPlayerNetDistance();
- this["#23"] = eval("#257");
- if(_loc4_ < 50)
- {
- this["#23"] *= 1;
- }
- else if(_loc4_ < 75)
- {
- this["#23"] *= 0.6666666666666666;
- }
- else
- {
- this["#23"] *= 0.5;
- }
- this.r = 3.75 / _loc4_;
- if(eval("#5")["#249"])
- {
- this["#23"] = Math.round(this["#23"] / _root["#24"]["#246"]);
- }
- if(eval("#5")["#364"])
- {
- this["#23"] *= 2;
- }
- this["#29"] = Math.abs(_root["#4"]["#9"]["#175"] - _root["#4"]["#9"]["#194"]);
- if(this["#29"] < this["#23"])
- {
- if(eval("#10")["#3"])
- {
- eval("#0").log(this["#2"]() + "made shot, accuracy: " + this["#29"] + "/" + this["#23"]);
- }
- this["#186"] = eval("#10")["#90"];
- if(this["#29"] < this["#23"] / 2)
- {
- this["#206"] = true;
- }
- else
- {
- this["#206"] = false;
- }
- }
- else
- {
- if(eval("#10")["#3"])
- {
- eval("#0").log(this["#2"]() + "missed shot, accuracy: " + this["#29"] + "/" + this["#23"]);
- }
- _loc7_ = -5;
- var _loc5_ = _root["#42"]._width / 2;
- var _loc6_ = _root["#4"]["#9"]._x - _root["#42"]._x;
- if(Math.abs(_loc6_) < 150 * eval("#5").scale)
- {
- if(_loc6_ < 0)
- {
- _loc3_ = _loc5_;
- }
- else
- {
- _loc3_ = - _loc5_;
- }
- }
- else
- {
- _loc3_ = eval("#14").getRandomSign() * _loc5_;
- }
- this["#186"] = eval("#10")["#61"];
- }
- this["#234"](_root["#42"]._x + _loc3_,_root["#42"]._y + _loc7_);
- }
- function §#234§(§#456§, §#457§)
- {
- this["#65"] = this._x;
- this["#84"] = this._y;
- this.x3 = §#456§;
- this["#212"] = §#457§;
- if(eval("#10")["#3"])
- {
- eval("#0").log(this["#2"]() + "computing arc from " + this["#65"] + "," + this["#84"] + " to " + this.x3 + "," + this["#212"]);
- }
- this["#104"] = this["#65"];
- this["#105"] = this["#84"];
- var _loc3_ = this._x - §#456§;
- var _loc2_ = this._y - §#457§;
- _loc3_ /= 3;
- _loc2_ = (- _loc2_) / 6;
- this["#104"] = this["#65"] - _loc3_;
- this["#105"] = _loc2_;
- this.x2 = this.x3 + _loc3_;
- this["#156"] = _loc2_;
- this["#214"] = this["#292"] = 100;
- this["#125"] = 3 * (this["#104"] - this["#65"]);
- this["#153"] = 3 * (this.x2 - this["#104"]) - this["#125"];
- this["#209"] = this.x3 - this["#65"] - this["#125"] - this["#153"];
- this["#126"] = 3 * (this["#105"] - this["#84"]);
- this["#154"] = 3 * (this["#156"] - this["#105"]) - this["#126"];
- this["#210"] = this["#212"] - this["#84"] - this["#126"] - this["#154"];
- this["#127"] = 3 * (this["#214"] - this["#213"]);
- this["#155"] = 3 * (this["#292"] - this["#214"]) - this["#127"];
- this["#211"] = this["#395"] - this["#213"] - this["#127"] - this["#155"];
- }
- function §#448§(§#474§, §#475§, speed)
- {
- if(§#474§ < §#475§)
- {
- §#474§ += speed;
- if(§#474§ > §#475§)
- {
- §#474§ = §#475§;
- }
- }
- else if(§#474§ > §#475§)
- {
- §#474§ -= speed;
- if(§#474§ < §#475§)
- {
- §#474§ = §#475§;
- }
- }
- return §#474§;
- }
- function §#103#10§()
- {
- if(this["#7"] == eval("#10")["#238"])
- {
- eval("#0").log(this["#2"]() + "can\'t move ball in still state");
- return true;
- }
- this["#16"] += this.r;
- if(this["#16"] >= 1)
- {
- this["#16"] = 1;
- }
- var _loc2_ = this["#16"] * this["#16"];
- var _loc3_ = this["#16"] * _loc2_;
- this.x = this["#209"] * _loc3_ + this["#153"] * _loc2_ + this["#125"] * this["#16"] + this["#65"];
- this.y = this["#210"] * _loc3_ + this["#154"] * _loc2_ + this["#126"] * this["#16"] + this["#84"];
- this["#293"] = this["#211"] * _loc3_ + this["#155"] * _loc2_ + this["#127"] * this["#16"] + this["#213"];
- this._x = this.x;
- this._y = this.y;
- if(this["#16"] >= 1)
- {
- return true;
- }
- return false;
- }
- function §#358§()
- {
- if(eval("#10")["#3"])
- {
- eval("#0").log(this["#2"]() + "throw ball (miss)");
- }
- this.swapDepths(_root["#35"]);
- var _loc3_ = undefined;
- var _loc4_ = _root["#4"]["#9"]._x - _root["#42"]._x;
- if(Math.abs(_loc4_) < 200 * eval("#5").scale)
- {
- if(_loc4_ < 0)
- {
- _loc3_ = eval("#14").getRandom(_root["#42"]._x,_root["#42"]._x * 1.5);
- }
- else
- {
- _loc3_ = eval("#14").getRandom(_root["#42"]._x * 0.5,_root["#42"]._x);
- }
- }
- else
- {
- _loc3_ = eval("#14").getRandom(_root["#42"]._x * 0.5,_root["#42"]._x * 1.5);
- }
- var _loc5_ = eval("#14").getRandom(Bounds.getYMin() * 1.25,Bounds.getYMax() * 0.75);
- eval("#1").getInstance()["#20"](eval("#1")["#277"]);
- this.r = this["#230"] * 1.6;
- this["#234"](_loc3_,_loc5_);
- }
- function §#363§()
- {
- if(eval("#10")["#3"])
- {
- eval("#0").log(this["#2"]() + "drop ball (score)");
- }
- this.swapDepths(_root["#35"]);
- this.r = this["#230"] * 1.5;
- this["#65"] = this._x;
- this["#84"] = this._y;
- this["#209"] = this["#210"] = this["#211"] = 0;
- this["#153"] = this["#154"] = this["#155"] = 0;
- this["#125"] = this["#127"] = 0;
- this["#126"] = Bounds.getYMin() * 1.15 - this._y;
- }
- function §#409§()
- {
- eval("#1").getInstance()["#20"](eval("#1")["#195"]);
- }
- }
-